
<div class="modal-header">
    <h4 class="modal-title">设置顶图</h4>
</div>
<div class="modal-body">

<div class="container-fluid">

    <div class="row">
        <div class="col-sm-2" ng-repeat="obj in imagearr track by $index">
            
            <!-- x -->
            <button style="margin-left: 10px" ng-click="imageDel($index)" type="button" class="close" aria-label="Close"><span aria-hidden="true">&times;</span></button>

            <!-- 往后 -->
            <button style="margin-left: 10px" ng-if="$index != imagearr.length - 1" ng-click="imageDown($index)" type="button" class="close" aria-label="Close"><span aria-hidden="true">&darr;</span></button>
            <!-- 往前 -->
            <button style="margin-left: 10px" ng-if="$index != 0" ng-click="imageUp($index)" type="button" class="close" aria-label="Close"><span aria-hidden="true">&uarr;</span></button>

            <img ng-src="{{obj}}" class="img-thumbnail img-responsive">

        </div>
        
    </div>


		
</div>

</div>
<div class="modal-footer">
    <button class="btn btn-success" ng-click="setImage()">添加图片</button>
</div>


<hr>



<div class="modal-header">
    <h4 class="modal-title">设置预定须知</h4>
</div>
<div class="modal-body">

<div class="container-fluid">

    

    <div class="row">
        <textarea class="form-control" rows="3" ng-model="bookingnotes"></textarea>
    </div>


        
</div>

</div>

<hr>



<div class="modal-header">
    <h4 class="modal-title">商品详情</h4>
</div>
<div class="modal-body">

<div class="container-fluid">

    <div class="row " style='height:667px;overflow:auto;'>
        <div class=" row " ng-repeat="detail in detailarr track by $index">
            <!-- <div ng-if="detail.type == 'text'" class="row">
                {{detail.value}}
            </div> -->
            <div class="col-sm-4 col-xs-12">
            <textarea ng-if="detail.type == 'text'"
             class="form-control" rows="3" ng-model="detail.value"></textarea>

            <div ng-if="detail.type == 'image'" class="row">
                <image ng-src="{{detail.value}}" width="100%" >
            </div>

            <!-- x -->
            <button style="margin-left: 10px" ng-click="detailDel($index)" type="button" class="close" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <!-- 下 -->
            <button style="margin-left: 10px" ng-if="$index != detailarr.length - 1" ng-click="detailDown($index)" type="button" class="close" aria-label="Close"><span aria-hidden="true">&darr;</span></button>
            <!-- 上 -->
            <button style="margin-left: 10px" ng-if="$index != 0" ng-click="detailUp($index)" type="button" class="close" aria-label="Close"><span aria-hidden="true">&uarr;</span></button>
            </div>
        </div>
    </div>

    <div class="row mt10">
        <label class="i-checks  checkbox-inline">
          <input type="radio" value='1' name='detailType'
          ng-model="detailType"
          >
          <i></i>
          文字
        </label>

        <label class="i-checks  checkbox-inline">
          <input type="radio" value='2' name='detailType'
          ng-model="detailType"
          >
          <i></i>
          图片
        </label>
    </div>

    <div class="row mt10" ng-if="detailType == '1'">
        <textarea class="form-control" rows="3" ng-model="detailTxt"></textarea>
        <button class="btn btn-success mt10" ng-click="setDetail(detailTxt)">添加</button>
    </div>
    <div class="row mt10" ng-if="detailType == '2'">
        <button class="btn btn-success" ng-click="setDetailImage()">添加图片</button>
    </div>
</div>

</div>







<hr>



<div class="modal-header">
    <h4 class="modal-title">设置限时购买</h4>
</div>
<div class="modal-body">

<div class="container-fluid">

    <div class="row">

    <div class="form-group" >
        <label class="col-xs-3  control-label text-right">启用</label>
        <div class="col-xs-9 ">
            <label class="i-switch m-t-xs m-r">
                <input type="checkbox" 
                  ng-checked="flash_state == '1'"
                  name="flash_state"
                  ng-true-value="'1'"
                  ng-false-value="'0'"
                  ng-model="flash_state"
                >
                <i></i>
              </label>
        </div>
    </div>
    </div>


    <div class="row mt10" ng-show="flash_state == '1'">
    <div class="form-group">
        <label class="col-xs-3 col-xs-4 control-label text-right">开始时间</label>
        <div class="col-sm-4 col-xs-12">
            <div class="input-group">
                <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="flashsale.start.date.lable" is-open="flashsale.start.date.opened" 
                    readonly close-text="关闭" current-text="今天" clear-text="清除" />
                <span class="input-group-btn">
                    <button type="button" class="btn btn-default"
                            ng-click="dateOpen($event, flashsale.start.date)">
                        <i class="glyphicon glyphicon-calendar"></i>
                    </button>
                </span>
            </div>
        </div>

        <div class="col-sm-2 col-xs-6">
            <select class="form-control" 
            ng-model="flashsale.start.h" 
            >
                <option value='00'>00时</option>
                <option value='01'>01时</option>
                <option value='02'>02时</option>
                <option value='03'>03时</option>
                <option value='04'>04时</option>
                <option value='05'>05时</option>
                <option value='06'>06时</option>
                <option value='07'>07时</option>
                <option value='08'>08时</option>
                <option value='09'>09时</option>
                <option value='10'>10时</option>
                <option value='11'>11时</option>
                <option value='12'>12时</option>
                <option value='13'>13时</option>
                <option value='14'>14时</option>
                <option value='15'>15时</option>
                <option value='16'>16时</option>
                <option value='17'>17时</option>
                <option value='18'>18时</option>
                <option value='19'>19时</option>
                <option value='20'>20时</option>
                <option value='21'>21时</option>
                <option value='22'>22时</option>
                <option value='23'>23时</option>
            </select>
        </div>

        <div class="col-sm-2 col-xs-6">
            <select class="form-control" 
            ng-model="flashsale.start.m" 
            >
                <option value='00'>00分</option>
                <option value='05'>05分</option>
                <option value='10'>10分</option>
                <option value='15'>15分</option>
                <option value='20'>20分</option>
                <option value='25'>25分</option>
                <option value='30'>30分</option>
                <option value='35'>35分</option>
                <option value='40'>40分</option>
                <option value='45'>45分</option>
                <option value='50'>50分</option>
                <option value='55'>55分</option>
                <option value='59'>59分</option>
            </select>
        </div>

    </div>
    </div>


    <div class="row mt10" ng-show="flash_state == '1'">
    <div class="form-group">
        <label class="col-sm-3 col-xs-4 control-label text-right">结束时间</label>
        <div class="col-sm-4 col-xs-12">
            <div class="input-group">
                    <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="flashsale.end.date.lable" is-open="flashsale.end.date.opened" 
                        readonly close-text="关闭" current-text="今天" clear-text="清除" />
                    <span class="input-group-btn">
                        <button type="button" class="btn btn-default"
                                ng-click="dateOpen1($event, flashsale.end.date)">
                            <i class="glyphicon glyphicon-calendar"></i>
                        </button>
                    </span>
                </div>
        </div>

        <div class="col-sm-2 col-xs-6">
            <select class="form-control" 
            ng-model="flashsale.end.h" 
            >
                <option value='00'>00时</option>
                <option value='01'>01时</option>
                <option value='02'>02时</option>
                <option value='03'>03时</option>
                <option value='04'>04时</option>
                <option value='05'>05时</option>
                <option value='06'>06时</option>
                <option value='07'>07时</option>
                <option value='08'>08时</option>
                <option value='09'>09时</option>
                <option value='10'>10时</option>
                <option value='11'>11时</option>
                <option value='12'>12时</option>
                <option value='13'>13时</option>
                <option value='14'>14时</option>
                <option value='15'>15时</option>
                <option value='16'>16时</option>
                <option value='17'>17时</option>
                <option value='18'>18时</option>
                <option value='19'>19时</option>
                <option value='20'>20时</option>
                <option value='21'>21时</option>
                <option value='22'>22时</option>
                <option value='23'>23时</option>
            </select>
        </div>

        <div class="col-sm-2 col-xs-6">
            <select class="form-control" 
            ng-model="flashsale.end.m" 
            >
                <option value='00'>00分</option>
                <option value='05'>05分</option>
                <option value='10'>10分</option>
                <option value='15'>15分</option>
                <option value='20'>20分</option>
                <option value='25'>25分</option>
                <option value='30'>30分</option>
                <option value='35'>35分</option>
                <option value='40'>40分</option>
                <option value='45'>45分</option>
                <option value='50'>50分</option>
                <option value='55'>55分</option>
                <option value='59'>59分</option>
            </select>
        </div>
    </div>
    </div>

        
</div>

</div>

<hr>


<div class="modal-header">
    <h4 class="modal-title">设置库存</h4>
</div>
<div class="modal-body">

<div class="container-fluid">

    <div class="row">

    <div class="form-group" >
        <label class="col-xs-3 control-label text-right">启用</label>
        <div class="col-xs-9">
            <label class="i-switch m-t-xs m-r">
                <input type="checkbox" 
                  ng-checked="stock_type == '1'"
                  name="stock_type"
                  ng-true-value="'1'"
                  ng-false-value="'0'"
                  ng-model="stock_type"
                >
                <i></i>
              </label>
        </div>
    </div>
    </div>

    <div class="row mt10" ng-show="stock_type == '1'">

    <div class="form-group" >
        <label class="col-sm-3 col-xs-4 control-label text-right">库存数量</label>
        <div class="col-sm-3 col-xs-12">
            <input type="text" class="form-control" ng-model="current_stock_num" placeholder="库存数量">
        </div>
    </div>
    </div>


        
</div>

</div>


<hr>


<div class="modal-header">
    <h4 class="modal-title">设置实名制限制</h4>
</div>
<div class="modal-body">

<div class="container-fluid">

    
    <div class="row">

    <div class="form-group" >
        <label class="col-sm-3 col-xs-5 control-label text-right">是否需要实名</label>
        <div class="col-sm-9 col-xs-12">
            <label class="i-checks  checkbox-inline">
                  <input type="radio" value="0" name="auth_state"
                  ng-model="auth_state"
                  >
                  <i></i>
                  不需要
            </label>

            <br><br>
            <label class="i-checks  checkbox-inline">
                  <input type="radio" value="1" name="auth_state"
                  ng-model="auth_state"
                  >
                  <i></i>
                  全部实名
            </label>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <span class="text-danger">如果将产品发布到系统平台，所有公众号统一实名</span>
            <br><br>
            <label class="i-checks  checkbox-inline">
                  <input type="radio" value="2" name="auth_state"
                  ng-model="auth_state"
                  >
                  <i></i>
                  机构实名
            </label>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <span class="text-danger">只在当前公众号下作实名限制</span>

            <br>
        </div>

        
    </div>
    </div>

        
</div>

</div>


<hr>



<div class="modal-header">
    <h4 class="modal-title">设置购买限制</h4>
</div>
<div class="modal-body">

<div class="container-fluid">



    <div class="row">

    <div class="form-group" >
        <label class="col-sm-3 col-xs-7 control-label text-right">是否限制最大购买数量</label>
        <div class="col-sm-9 col-xs-12">
            <label class="i-checks  checkbox-inline">
                  <input type="radio" value="0" name="order_num_state"
                  ng-model="order_num_state"
                  >
                  <i></i>
                  不限制
            </label>

            <br><br>
            <label class="i-checks  checkbox-inline">
                  <input type="radio" value="1" name="order_num_state"
                  ng-model="order_num_state"
                  >
                  <i></i>
                  平台限制
            </label>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <span class="text-danger">如果将产品发布到系统平台，所有公众号统一限制</span>
            <br><br>
            <label class="i-checks  checkbox-inline">
                  <input type="radio" value="2" name="order_num_state"
                  ng-model="order_num_state"
                  >
                  <i></i>
                  公众号限制
            </label>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <span class="text-danger">只在当前公众号下作限制</span>

            <br>
        </div>

        
    </div>
    </div>

    <div class="row mt10" ng-show="order_num_state != '0'">
    <div class="form-group" >
        <label class="col-sm-3 col-xs-14 control-label text-right">限制购买数量</label>
        <div class="col-sm-3 col-xs-12">
            <input type="text" class="form-control" ng-model="order_limit_num" placeholder="限制购买数量">
        </div>
    </div>
    </div>


    <div class="row mt10" ng-show="order_num_state != '0'">

    <div class="form-group" >
        <label class="col-sm-3 col-xs-4 control-label text-right">限制方式</label>
        <div class="col-sm-3 col-xs-12">
            <label class="i-checks  checkbox-inline">
                  <input type="radio" value="0" name="order_limit_type"
                  ng-model="order_limit_type"
                  >
                  <i></i>
                  手机号
            </label>

            <label class="i-checks  checkbox-inline">
                  <input type="radio" value="1" name="order_limit_type"
                  ng-model="order_limit_type"
                  >
                  <i></i>
                  身份证号
            </label>

            <label class="i-checks  checkbox-inline">
                  <input type="radio" value="3" name="order_limit_type"
                  ng-model="order_limit_type"
                  >
                  <i></i>
                  支付id
            </label>
        </div>

        
    </div>
    </div>



    


        
</div>

</div>


<hr>


<div class="modal-header">
    <h4 class="modal-title">设置下单信息</h4>
</div>
<div class="modal-body">

<div class="container-fluid">

    
   <div class="row mt10">

    <div class="form-group" >
        <label class="col-sm-3 col-xs-6 control-label text-right">身份证是否必填</label>
        <div class="col-sm-9 col-xs-6">
            <label class="i-switch m-t-xs m-r">
                <input type="checkbox" 
                  ng-checked="cardno_state == '1'"
                  name="cardno_state"
                  ng-true-value="'1'"
                  ng-false-value="'0'"
                  ng-model="cardno_state"
                >
                <i></i>
              </label>
        </div>
    </div>
    </div>

        
</div>

</div>


<hr>





<div class="modal-header">
    <h4 class="modal-title">设置推广文字</h4>
</div>
<div class="modal-body">

<div class="container-fluid">

    <div class="row">
        <div class="alert alert-warning alert-dismissible" role="alert"
         ng-repeat="text in textarr"
        >
          <button type="button" class="close" aria-label="Close" ng-click="del_text($index)"><span aria-hidden="true">&times;</span></button>
          &nbsp;&nbsp;&nbsp;&nbsp;
          <button
            ng-if="$index != textarr.length - 1"
            type="button" class="close" aria-label="Close" ng-click="textDown($index)"><span aria-hidden="true">&darr;</span></button>
          &nbsp;&nbsp;&nbsp;&nbsp;
          <button
            ng-if="$index != 0"
            type="button" class="close" aria-label="Close" ng-click="textUp($index)"><span aria-hidden="true">&uarr;</span></button>

            {{text}}
        </div>

    </div>

    <div class="row">
        <textarea class="form-control" rows="3" ng-model="text"></textarea>
    </div>


        
</div>

</div>
<div class="modal-footer">
    <button class="btn btn-success" ng-click="setText()">添加文字</button>
</div>




<div class="modal-footer">
    <button class="btn btn-primary" type="button" ng-click="gogo()">保存</button>
    <button class="btn btn-warning" type="button" ng-click="cancel()">返回</button>
</div>



